package com.mccrea.pattern.proxy.dynamic;

/**
 * @Classname Client
 * @Description 测试动态代理
 * @Date 2021/5/17 0017 14:35
 * @Created by Mccrea_Gao
 */
public class Client {
    public static void main(String[] args) {
        // 目标对象
        ITeacherDao target = new TeacheDao();
        // 代理对象
        ITeacherDao proxyInstance = (ITeacherDao) new ProxyFactory(target).getProxyInstance();
        proxyInstance.teach();
    }
}
